<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		function select(start,end){
			var total = end - start + 1;
			return Math.floor(Math.random()*total + start);
		}
		for(var i=0;i<10;i++){
			document.write(select(0,5))
			document.write("<br />")
		}

	</script>



<h2>js代码如下：</h2>
<div style="background:#f0eef5;">
<pre>
function select(start,end){
	var total = end - start + 1;
	return Math.floor(Math.random()*total + start);
}
for(var i=0;i<10;i++){
	document.write(select(0,5))
	document.write("<br />")
}
</pre>
</div>
</body>
</html>